package com.nnnu.wsnackshop.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
@Schema(description = "添加用户dto")
public class AddUserDTO {
    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 50)
    @Schema(description = "用户名")
    private String username;

    @NotBlank(message = "密码不能为空")
    @Schema(description = "密码")
    @Size(min = 6, max = 100)
    private String password;

    @Size(max = 20)
    @Schema(description = "手机号")
    private String phone;

    @NotNull(message = "角色不能为空")
    @Schema(description = "角色id")
    private Integer roleId;
}
